gdk: Drop gdk_device_get_associated_device()
authorCarlos Garnacho <carlosg@gnome.org>
Thu, 30 Jul 2020 12:30:57 +0000 (14:30 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Thu, 30 Jul 2020 16:30:13 +0000 (18:30 +0200)
Devices are no longer associated like this, the seat should be used
to resolve queries on other devices.

docs/reference/gdk/gdk4-sections.txt
gdk/gdkdevice.c
gdk/gdkdevice.h

index 40e5378681bb8de60891a64138c8a078846fa0de..a438ee000ca42fd5cf9d9cce56a7269c09415ba0 100644 (file)
@@ -352,7 +352,6 @@ gdk_device_get_name
 gdk_device_get_vendor_id
 gdk_device_get_product_id
 gdk_device_get_source
-gdk_device_get_associated_device
 gdk_device_list_physical_devices
 gdk_device_get_device_type
 gdk_device_get_display
index bdb2799c05cca3dbd0a961ff12be990ed034b506..dabefc992d08ff572c472ad54bc141635011d9a9 100644 (file)
@@ -86,7 +86,6 @@ enum {
   PROP_0,
   PROP_DISPLAY,
   PROP_NAME,
-  PROP_ASSOCIATED_DEVICE,
   PROP_TYPE,
   PROP_SOURCE,
   PROP_HAS_CURSOR,
@@ -155,20 +154,6 @@ gdk_device_class_init (GdkDeviceClass *klass)
                          G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
                          G_PARAM_STATIC_STRINGS);
 
-  /**
-   * GdkDevice:associated-device:
-   *
-   * Associated pointer or keyboard with this device, if any. Devices of
-   * type #GDK_DEVICE_TYPE_LOGICAL always come in keyboard/pointer pairs.
-   * Other device types will have a %NULL associated device.
-   */
-  device_props[PROP_ASSOCIATED_DEVICE] =
-      g_param_spec_object ("associated-device",
-                           P_("Associated device"),
-                           P_("Associated pointer or keyboard with this device"),
-                           GDK_TYPE_DEVICE,
-                           G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
-
   /**
    * GdkDevice:source:
    *
@@ -460,9 +445,6 @@ gdk_device_get_property (GObject    *object,
     case PROP_DISPLAY:
       g_value_set_object (value, device->display);
       break;
-    case PROP_ASSOCIATED_DEVICE:
-      g_value_set_object (value, device->associated);
-      break;
     case PROP_NAME:
       g_value_set_string (value, device->name);
       break;
@@ -670,30 +652,6 @@ gdk_device_get_display (GdkDevice *device)
   return device->display;
 }
 
-/**
- * gdk_device_get_associated_device:
- * @device: a #GdkDevice
- *
- * Returns the #GdkDevice associated to @device:
- *
- *  - if @device is of type %GDK_DEVICE_TYPE_LOGICAL, it will return
- *    the paired pointer or keyboard.
- *  - if @device is of type %GDK_DEVICE_TYPE_PHYSICAL, it will return
- *    the logical device to which @device is attached to.
- *  - if @device is of type %GDK_DEVICE_TYPE_FLOATING, %NULL will be
- *    returned, as there is no associated device.
- *
- * Returns: (nullable) (transfer none): The associated device, or
- *   %NULL
- **/
-GdkDevice *
-gdk_device_get_associated_device (GdkDevice *device)
-{
-  g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
-
-  return device->associated;
-}
-
 static void
 _gdk_device_set_device_type (GdkDevice     *device,
                              GdkDeviceType  type)
index 644451a0bfc1cbc8580d39200be1889c236762bb..0cba90a4959f2e962e79b21d807125e7fadfcf66 100644 (file)
@@ -114,8 +114,6 @@ GdkSurface * gdk_device_get_surface_at_position (GdkDevice *device,
 GDK_AVAILABLE_IN_ALL
 GdkDisplay * gdk_device_get_display (GdkDevice      *device);
 
-GDK_AVAILABLE_IN_ALL
-GdkDevice  * gdk_device_get_associated_device (GdkDevice     *device);
 GDK_AVAILABLE_IN_ALL
 GList *      gdk_device_list_physical_devices (GdkDevice     *device);